home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 054a / stupid1.zip / SWT-INST.BAT < prev   
DOS Batch File  |  1992-08-27  |  4KB  |  103 lines

  1. @echo off
  2. echo             S T U P I D   W I N D O W S   T R I C K S
  3. echo                       Installation  Program
  4. echo   .
  5. echo   If you have not supplied a path specification for where the
  6. echo   tricks should be installed they will be installed under the
  7. echo   C:\WINDOWS directory.  The installation program will soon
  8. echo   pause and ask you to strike a key to continue.  If you have
  9. echo   forgotten to supply an alternative directory, or don't want
  10. echo   the tricks to be installed under C:\WINDOWS, enter Ctrl-C
  11. echo   at the next prompt.  This will cause the installation program
  12. echo   to halt, and you can elect to terminate it by striking Y in
  13. echo   answer to the question "Terminate batch job? (Y/N)"
  14. echo   .
  15. pause
  16. REM    check for default/explicit
  17. cls
  18. if "%1"=="" goto default
  19.  
  20. REM    Parameter-supplied install follows
  21. :explicit
  22. echo   Parameter-supplied install chosen for %1:\%2.   The
  23. echo   Tricks will be installed in a family of directories under the
  24. echo   %1:\%2 directory.  You may enter CTRL-C right now to terminate
  25. echo   this program.
  26. echo   .
  27. echo   .
  28. pause
  29. cls
  30. echo   .
  31. echo   Explicit installation requires two arguments:
  32. echo   1.  the drive letter where the target directory resides
  33. echo       Do NOT follow the drive letter with a colon (":")
  34. echo   2.  the specification for the directory under which the 
  35. echo       Stupid Windows Tricks should be placed.
  36. echo       Do NOT precede the directory name with a backslash ("\")
  37. echo   .
  38. echo   To "trick" the program into moving the files under a directory
  39. echo   other than WINDOWS, you will have to create a dummy WIN.INI
  40. echo   file (because the install program looks for that file name)
  41. echo   in the target directory.  You can create such a file very 
  42. echo   quickly within DOS by typing the text within the quotes below
  43. echo       "COPY CON WIN.INI"
  44. echo       "TEXT"
  45. echo       "^Z"
  46. echo   The last character is a Ctrl-Z, and terminates the file entry.
  47. echo   By copying this bogus WIN.INI file to wherever it's needed,
  48. echo   you can force the install program to work.  It's easier just
  49. echo   to put it under your real WINDOWS directory, though.  If you
  50. echo   do create a bogus WIN.INI file, DO NOT do so in the WINDOWS
  51. echo   directory--you will *DESTROY* your real WIN.INI!!!
  52. echo   .
  53. pause
  54. cls
  55. if not exist %1:\%2\win.ini goto badloc
  56. if not exist stup-win.exe goto badloc
  57. copy stup-win.exe %1:\%2
  58. if not errorlevel==0 goto badloc
  59. %1:
  60. cd %2
  61. stup-win.exe -d
  62. del stup-win.exe
  63. echo   Files installed; compressed Tricks file deleted!
  64. echo   To install Tricks, start up Windows and follow instructions
  65. echo   from the book.   ENJOY!!
  66. goto done
  67.  
  68. :default
  69. REM    Default install follows
  70. echo   You have chosen the default installation.  The Stupid Windows
  71. echo   Tricks will be installed in a family of directories under the
  72. echo   C:\WINDOWS directory.  You may enter CTRL-C right now to
  73. echo   terminate this program.
  74. echo   .
  75. echo   .
  76. if not exist c:\windows\win.ini goto badloc
  77. if not exist stup-win.exe goto badloc
  78. copy stup-win.exe c:\windows
  79. if not errorlevel==0 goto badloc
  80. c:
  81. cd c:\stupid
  82. stup-win.exe -d
  83. del stup-win.exe
  84. echo   Files installed; compressed Tricks file deleted!
  85. echo   To install Tricks, start up Windows and follow instructions
  86. echo   from the book.   ENJOY!!
  87. goto done
  88.  
  89. :badloc
  90. REM    Handle bad location, other errors (WIN.INI not found)
  91. echo   Our install program's error checker failed!   If this is  not
  92. echo   because a bad directory reference was supplied, it is because
  93. echo   the install program did not find  WIN.INI  in this directory.
  94. echo   It  needs to find  this file  in order to  work  properly; if
  95. echo   you are sure  that you want the  Stupid Windows Tricks  to be
  96. echo   installed into the directory the program has selected, create
  97. echo   a file named  WIN.INI in the target directory and the install
  98. echo   will work when you try it again.
  99.  
  100. :done
  101.  
  102.  
  103.